package me.leiusual.sharing.repository

import android.content.Context
import io.reactivex.Single
import me.leiusual.sharing.GlideApp
import me.leiusual.sharing.repository.model.CountDownLiveData
import javax.inject.Inject
import javax.inject.Singleton

/**
 * Create by leiusual on 2018/7/15
 */
@Singleton
class PlatformRepository @Inject constructor(
    private val context: Context
) {

  fun startCountDown() = CountDownLiveData()

  fun clearCache(): Single<Unit> {
    return Single
        .fromCallable {
          GlideApp.get(context).clearDiskCache()
        }
  }
}